import 'package:flutter/material.dart';
import 'package:flutter_aggregate/model/plant/constants.dart';
import 'package:flutter_svg/flutter_svg.dart';

import 'icon_card.dart';

class ImageAndIcons extends StatelessWidget {
  const ImageAndIcons({
    Key? key,
    required this.size,
  }) : super(key: key);

  final Size size;

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: const EdgeInsets.only(bottom: palntKDefaultPadding * 3),
      child: SizedBox(
        height: size.height * 0.8,
        child: Row(
          children: [
            Expanded(child: Padding(
              padding: const EdgeInsets.symmetric(vertical: palntKDefaultPadding * 3),
              child: Column(
                children: [
                   Align(
                    alignment: Alignment.topLeft,
                    child: IconButton(
                      onPressed: () {
                        Navigator.pop(context);
                      }, 
                      icon: SvgPicture.asset('assets/plant/icons/back_arrow.svg')
                    ),
                  ),
                  const Spacer(),
                  const IconCard(icon: 'assets/plant/icons/sun.svg'),
                  const IconCard(icon: 'assets/plant/icons/icon_2.svg'),
                  const IconCard(icon: 'assets/plant/icons/icon_3.svg'),
                  const IconCard(icon: 'assets/plant/icons/icon_4.svg')
                ],
              ),
            )),
            Container(
              height: size.height * 0.8,
              width: size.width * 0.75,
              decoration: BoxDecoration(
                borderRadius: const BorderRadius.horizontal(
                  left: Radius.circular(63)
                ),
                boxShadow: [
                  BoxShadow(
                    offset: const Offset(0, 10),
                    blurRadius: 60,
                    color: palntKPrimaryColor.withOpacity(0.29)
                  )
                ],
                image: const DecorationImage(
                  alignment: Alignment.centerLeft,
                  fit: BoxFit.cover,
                  image: AssetImage(
                    'assets/plant/images/img.png'
                  )
                )
              ),
            )
          ],
        ),
      ),
    );
  }
}